package com.example.demo.dao.mapper;

import com.example.demo.dao.pojo.UserInfo;
import com.example.demo.vo.params.UpdateUserParams;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {


    // 1. 新增用户
    public int add(UserInfo userInfo);

    // 2. 删除用户
    public int remove(String username);

    // 3. 查询用户详情
    public UserInfo selectOneByName(String username);

    // 4. 查找用户
    public UserInfo select(String username, String password);

    public int getCount(String question);

    public List<UserInfo> selectByLike(String question, int page, Integer pageSize);

    public int deleteById(int id);

    public int update(UpdateUserParams params);

    public UserInfo selectById(int id);
}
